package com.foreknow.demo2;

public class Graduate implements StudentInterface,TeacherInterface {
    private String name;
    private String sex;
    private int age;
    private double fee;
    private double pay;

    @Override
    public void setFree(double fee) {
        this.fee = fee;
        System.out.println("您的学费设置为"+ this.fee);
    }

    @Override
    public void getFree(double fee) {
        this.fee = fee;
        System.out.println("您的学费设置为"+ this.fee);
    }

    @Override
    public void setPay(double pay) {
        this.pay = pay * 12;
        System.out.println("您的年收入为：" + this.pay);
    }

    @Override
    public void getPay(double pay) {
        this.pay = pay * 12;
        System.out.println("您的年收入为：" + this.pay);
    }

    public boolean load() {
        if((this.pay-this.fee) < 2000) {
            return true;
        }
        return false;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public double getFee() {
        return fee;
    }

    public void setFee(double fee) {
        this.fee = fee;
    }

    public double getPay() {
        return pay;
    }


}
